home *** CD-ROM | disk | FTP | other *** search
/ La Bible Des... Jeux / La Bible des... Jeux.iso / Les Sharewares / Aventure / Game with Fields / Game w⁄Fields / Game w_Fields / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1996-01-28  |  14.5 KB  |  78 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>59</cardCount>
  7.     <cardID>3616</cardID>
  8.     <listID>20635</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on resume
  17. send openStack
  18. end resume
  19.  
  20. on openStack
  21. global positionColumn
  22. global positionRow
  23. global soundOn
  24. global twoObjects
  25. global action
  26. global object
  27. global map
  28. global immobile
  29. hide message box
  30. show menuBar
  31. put "-- Immobile" into immobile
  32. send createMenu
  33. put item 1 of line 1 of card field "Last Position" ┬¼
  34. of card "Constants" into positionRow
  35. put item 2 of line 1 of card field "Last Position" ┬¼
  36. of card "Constants" into positionColumn
  37. put card field "Map" of card "Constants" into map
  38. put "Yes" into soundOn
  39. put empty into twoObjects
  40. put empty into action
  41. put empty into object
  42. send goToCard
  43. end openStack
  44.  
  45. on createMenu
  46. create menu "Game"
  47. put "New Game,Sound Off,-,Quit" into menu "Game"┬¼
  48. with menuMsgs "newGame,soundOff,,quitGame"
  49. put "About " & the short name of this stack & "..." into menuItem 1 of menu 1 with menuMsgs┬¼
  50. "AboutGame"
  51. end createMenu
  52.  
  53. on newGame
  54. global twoObjects
  55. put "Reset all the variables here"
  56. beep 1
  57. wait 1 second
  58. hide msg box
  59. put empty into twoObjects
  60. end newGame
  61.  
  62. on soundOff
  63. global soundOn
  64. global twoObjects
  65. put "Sound On" into menuItem 2 of menu "Game" with menuMsgs┬¼
  66. "soundOn"
  67. put "No" into soundOn
  68. put empty into twoObjects
  69. end soundOff
  70.  
  71. on soundOn
  72. global soundOn
  73. global twoObjects
  74. put "Sound Off" into menuItem 2 of menu "Game" with menuMsgs┬¼
  75. "soundOff"
  76. put "Yes" into soundOn
  77. put empty into twoObjects
  78. end soundOn
  79.  
  80. on quitGame
  81. global twoObjects
  82. put empty into twoObjects
  83. go home
  84. end quitGame
  85.  
  86. on aboutGame
  87. answer "This is Cindy's game!"
  88. end aboutGame
  89.  
  90. on closeStack
  91. global positionColumn
  92. global positionRow
  93. put positionRow into item 1 of line 1 of card field ┬¼
  94. "Last Position" of card "Constants"
  95. put positionColumn into item 2 of line 1 of card field┬¼
  96. "Last Position" of card "Constants"
  97. put empty into positionColumn
  98. put empty into positionRow
  99. reset menubar
  100. end closeStack
  101.  
  102. on openCard
  103. global positionColumn
  104. global positionRow
  105. if positionColumn is empty then
  106. openStack
  107. else
  108. lock screen
  109. set cursor to 4
  110. showButtons
  111. showDescription
  112. end if
  113. end openCard
  114.  
  115. on showButtons
  116. global positionRow
  117. global positionColumn
  118. global map
  119. if item positionColumn of line (positionRow - 1) of map┬¼
  120. contains "*" then
  121. hide bg button "Forward"
  122. else
  123. show bg button "Forward"
  124. end if
  125. if item positionColumn of line (positionRow + 1) of map┬¼
  126. contains "*" then
  127. hide bg button "Backward"
  128. else
  129. show bg button "Backward"
  130. end if
  131. if item (positionColumn - 1) of line positionRow of map┬¼
  132. contains "*" then
  133. hide bg button "Left"
  134. else
  135. show bg button "Left"
  136. end if
  137. if item (positionColumn + 1) of line positionRow of map┬¼
  138. contains "*" then
  139. hide bg button "Right"
  140. else
  141. show bg button "Right"
  142. end if
  143. if bg field "Card Name" is empty then
  144. put the short name of this card into bg field "Card Name"
  145. end if
  146. end showButtons
  147.  
  148. on showDescription
  149. lock screen
  150. put empty into bg field "Text Field"
  151. if bg field "Room Description" is not empty then
  152. put bg field "Room Description" into bg field "Text Field"
  153. else
  154. doPut the short name of this card & "."
  155. end if
  156. end showDescription
  157.  
  158. on showObjects
  159. put "You see:" after bg field "Text Field"
  160. repeat with X = 1 to the number of card fields
  161. if the visible of card field X is true then
  162. doPut " " & the short name of card field X & ","
  163. end if
  164. end repeat
  165. get last char of last word of last line of bg field "Text Field"
  166. if it is "," then
  167. put "." into last char of last word of last line of ┬¼
  168. bg field "Text Field"
  169. else if it is ":" then
  170. doPut "nothing."
  171. end if
  172. end showObjects
  173.  
  174. on goToCard
  175. global map
  176. global positionColumn
  177. global positionRow
  178. global twoObjects
  179. global nextCard
  180. set cursor to watch
  181. put item positionColumn of line positionRow of ┬¼
  182. map into nextCard
  183. strip " "
  184. strip quote
  185. go to card nextCard
  186. put empty into twoObjects
  187. end goToCard
  188.  
  189. on strip stripChar
  190. global nextCard
  191. repeat forever
  192. put "no" into stripAgain
  193. if first char of nextCard is stripChar then
  194. put empty into first char of nextCard
  195. put "yes" into stripAgain
  196. end if
  197. if last char of nextCard is stripChar then
  198. put empty into last char of nextCard
  199. put "yes" into stripAgain
  200. end if
  201. if stripAgain is "no" then
  202. exit repeat
  203. end if
  204. end repeat
  205. end strip
  206.  
  207. on doGet
  208. global object
  209. if object is in bg field "inventory" then
  210. doPut "You already have " & object & "!"
  211. exit doGet
  212. else
  213. if the script of cd fld object contains immobile then
  214. doPut "You can't get " & object & "!"
  215. exit doGet
  216. else
  217. doPut "Rearranging pack, just a moment..."
  218. lock screen
  219. set cursor to 4
  220. select card field object
  221. domenu "Clear Field"
  222. put object & return after bg field "Inventory" of card "Inventory"
  223. end if
  224. choose browse tool
  225. doPut "You now have " & object & "."
  226. end if
  227. end doGet
  228.  
  229. on doDrop
  230. global object
  231. global immobile
  232. if object is not in bg field "inventory" then
  233. doPut "You don't have " & object & "!"
  234. else
  235. doPut "Rearranging pack, just a moment..."
  236. lock screen
  237. set cursor to 4
  238. push card
  239. go to card "Inventory"
  240. select card field object
  241. domenu "Copy Field"
  242. pop card
  243. domenu "Paste Field"
  244. put card field object of card "Inventory" into card field object
  245. --Empty out the inventory here
  246. put length(object) into objectLength
  247. put offset(return & object,bg field "Inventory") + 1 into firstChar
  248. put firstChar + objectLength into lastChar
  249. put empty into char firstChar to lastChar of bg field "Inventory"
  250. choose browse tool
  251. doPut object & ": dropped."
  252. end if
  253. end doDrop
  254.  
  255. on doLook
  256. doPut "You can't see any more detail."
  257. end doLook
  258.  
  259. on doSearch
  260. doPut "You find nothing."
  261. end doSearch
  262.  
  263. on doOpen
  264. global object
  265. doPut "You can't open " & object & "!"
  266. end doOpen
  267.  
  268. on doClose
  269. global object
  270. doPut "You can't close " & object & "!"
  271. end doClose
  272.  
  273. on doUse
  274. global object
  275. global recipient
  276. doPut "You can't use " & object & " on " & recipient & "."
  277. end doUse
  278.  
  279. on doWait
  280. global object
  281. doPut "Waiting..."
  282. repeat 10 times
  283. set cursor to busy
  284. end repeat
  285. end doWait
  286.  
  287. on doTurnOn
  288. global object
  289. doPut "You can't turn on " & object & "!"
  290. end doTurnOn
  291.  
  292. on doTurnOff
  293. global object
  294. doPut "You can't turn off " & object & "!"
  295. end doTurnOff
  296.  
  297. on doEnter
  298. global object
  299. doPut "You can't enter " & object & "!"
  300. end doEnter
  301.  
  302. on doExit
  303. global object
  304. doPut "You can't exit " & object & "!"
  305. end doExit
  306.  
  307. on doPush
  308. global object
  309. doPut "You can't push " & object & "!"
  310. end doPush
  311.  
  312. on doPull
  313. global object
  314. doPut "You can't pull " & object & "!"
  315. end doPull
  316.  
  317. on doEat
  318. global object
  319. doPut "You can't eat " & object & "!"
  320. end doEat
  321.  
  322. on doRead
  323. global object
  324. doPut "You can't make out any writing on " & object & "."
  325. end doRead
  326.  
  327. on doSay
  328. global object
  329. doPut "Don't bother - " & object & " isn't listening."
  330. end doSay
  331.  
  332. on doGive
  333. global object
  334. global recipient
  335. doPut "You can't give " & object & " to the " & recipient & "."
  336. end doGive
  337.  
  338. on startHelp
  339. global object
  340. answer "How much help do you want?" with┬¼
  341. "A little" or "A lot" or "Tell Me All!"
  342. put "card field " & quote & object & quote into whereToSend
  343. if object is in bg field "inventory" then
  344. put " of card Inventory" after whereToSend
  345. end if
  346. if it is "A little" then
  347. send "doHelp aLittle" to whereToSend
  348. else if it is "A lot" then
  349. send "doHelp aLot" to whereToSend
  350. else
  351. send "doHelp aDummy" to whereToSend
  352. end if
  353. end startHelp
  354.  
  355. on doHelp help
  356. if help is "aLittle" then
  357. doPut "Sorry, no hints available."
  358. beep 1
  359. else if help is "aLot" then
  360. doPut "No hints available right now!"
  361. beep 2
  362. else
  363. doPut "You're on your own here, Buster!"
  364. beep 3
  365. end if
  366. end doHelp
  367.  
  368. on idle
  369. global action
  370. global object
  371. global recipient
  372. global twoObjects
  373. global whereToSend
  374. if twoObjects is empty then
  375. if ((action is not empty) and (object is not empty)) then
  376. set cursor to watch
  377. put "card field " & quote & object & quote into whereToSend
  378. if (item 1 of object) is in bg field "inventory" then
  379. put " of card Inventory" after whereToSend
  380. end if
  381. if action is "doDrop" then
  382. doDrop object
  383. else if action is "doGet" then
  384. doGet object
  385. else
  386. set cursor to 4
  387. send action to whereToSend
  388. end if
  389. put empty into action
  390. put empty into object
  391. end if
  392. else
  393. if ((action is not empty) and (object is not empty) and┬¼
  394. (recipient is not empty)) then
  395. set cursor to watch
  396. put "card field " & quote & recipient & quote into whereToSend
  397. if (item 1 of recipient) is in bg field "inventory" then
  398. put " of card Inventory" after whereToSend
  399. end if
  400. send (action & quote & object & quote) to whereToSend
  401. put empty into action
  402. put empty into object
  403. put empty into recipient
  404. end if
  405. end if
  406. end idle
  407.  
  408. on doPut msgString
  409. put msgString & " " after background field "text field"
  410. set the scroll of bg field "text field" to 1000
  411. end doPut
  412.  
  413. on describeTheRoom
  414. doPut "You can't see any more detail about that."
  415. end describeTheRoom
  416.  
  417. on dragMe
  418. set loc of the target to the mouseLoc
  419. end dragMe
  420.  
  421. on arrowKey direction
  422. if direction is "left" then click at loc of bg button "Left"
  423. else if direction is "right" then click at loc of bg button "Right"
  424. else if direction is "up" then click at loc of bg button "Forward"
  425. else if direction is "down" then click at loc of bg button "Backward"
  426. end arrowKey
  427.  
  428. on doMenu item
  429. if item is "Find..." then
  430. show bg field "Scene List"
  431. else
  432. pass doMenu
  433. end if
  434. end doMenu
  435.  
  436. </script>
  437.     <background id="2761" file="background_2761.xml" name="" />
  438.     <card id="3616" file="card_3616.xml" marked="false" name="Start Screen" owner="2761" />
  439.     <card id="4019" file="card_4019.xml" marked="false" name="Constants" owner="2761" />
  440.     <card id="6088" file="card_6088.xml" marked="false" name="Inventory" owner="2761" />
  441.     <card id="2915" file="card_2915.xml" marked="false" name="Fire Hydrant" owner="2761" />
  442.     <card id="6648" file="card_6648.xml" marked="false" name="Sidewalk 29" owner="2761" />
  443.     <card id="4292" file="card_4292.xml" marked="false" name="Sidewalk 30" owner="2761" />
  444.     <card id="4426" file="card_4426.xml" marked="false" name="Sidewalk 31" owner="2761" />
  445.     <card id="4720" file="card_4720.xml" marked="false" name="Sidewalk 32" owner="2761" />
  446.     <card id="5012" file="card_5012.xml" marked="false" name="Phone Booth" owner="2761" />
  447.     <card id="5283" file="card_5283.xml" marked="false" name="Sidewalk 34" owner="2761" />
  448.     <card id="5471" file="card_5471.xml" marked="false" name="Newspaper Stand" owner="2761" />
  449.     <card id="7305" file="card_7305.xml" marked="false" name="Sidewalk 27" owner="2761" />
  450.     <card id="7628" file="card_7628.xml" marked="false" name="Inside Phone Booth" owner="2761" />
  451.     <card id="7687" file="card_7687.xml" marked="false" name="Sidewalk 2" owner="2761" />
  452.     <card id="8095" file="card_8095.xml" marked="false" name="Sidewalk 26" owner="2761" />
  453.     <card id="8219" file="card_8219.xml" marked="false" name="Bedroom" owner="2761" />
  454.     <card id="8459" file="card_8459.xml" marked="false" name="Bathroom" owner="2761" />
  455.     <card id="8896" file="card_8896.xml" marked="false" name="Sidewalk 3" owner="2761" />
  456.     <card id="9116" file="card_9116.xml" marked="false" name="Sidewalk 25" owner="2761" />
  457.     <card id="9469" file="card_9469.xml" marked="false" name="Front Yard" owner="2761" />
  458.     <card id="9586" file="card_9586.xml" marked="false" name="Living Room" owner="2761" />
  459.     <card id="9738" file="card_9738.xml" marked="false" name="Dining Room" owner="2761" />
  460.     <card id="10147" file="card_10147.xml" marked="false" name="Jail Cell" owner="2761" />
  461.     <card id="10453" file="card_10453.xml" marked="false" name="Sidewalk 4" owner="2761" />
  462.     <card id="10604" file="card_10604.xml" marked="false" name="Sidewalk 24" owner="2761" />
  463.     <card id="10898" file="card_10898.xml" marked="false" name="Music Room" owner="2761" />
  464.     <card id="11086" file="card_11086.xml" marked="false" name="Kitchen" owner="2761" />
  465.     <card id="11478" file="card_11478.xml" marked="false" name="Handwriting Analysis" owner="2761" />
  466.     <card id="11707" file="card_11707.xml" marked="false" name="Sergeant's Desk" owner="2761" />
  467.     <card id="11782" file="card_11782.xml" marked="false" name="Sidewalk 5" owner="2761" />
  468.     <card id="12247" file="card_12247.xml" marked="false" name="Sidewalk 23" owner="2761" />
  469.     <card id="12341" file="card_12341.xml" marked="false" name="Storage Room" owner="2761" />
  470.     <card id="12545" file="card_12545.xml" marked="false" name="Bedroom" owner="2761" />
  471.     <card id="12989" file="card_12989.xml" marked="false" name="Sidewalk 6" owner="2761" />
  472.     <card id="13159" file="card_13159.xml" marked="false" name="Sidewalk 22" owner="2761" />
  473.     <card id="13498" file="card_13498.xml" marked="false" name="Inside Theater" owner="2761" />
  474.     <card id="13687" file="card_13687.xml" marked="false" name="Ticket Office" owner="2761" />
  475.     <card id="14028" file="card_14028.xml" marked="false" name="Bijou" owner="2761" />
  476.     <card id="14194" file="card_14194.xml" marked="false" name="Sidewalk 21" owner="2761" />
  477.     <card id="14434" file="card_14434.xml" marked="false" name="Customers 2" owner="2761" />
  478.     <card id="14640" file="card_14640.xml" marked="false" name="Sidewalk 8" owner="2761" />
  479.     <card id="15081" file="card_15081.xml" marked="false" name="Amelias" owner="2761" />
  480.     <card id="15234" file="card_15234.xml" marked="false" name="Maitre'D 1" owner="2761" />
  481.     <card id="15456" file="card_15456.xml" marked="false" name="Customers 1" owner="2761" />
  482.     <card id="15634" file="card_15634.xml" marked="false" name="Customers 4" owner="2761" />
  483.     <card id="15921" file="card_15921.xml" marked="false" name="Customers 3" owner="2761" />
  484.     <card id="16148" file="card_16148.xml" marked="false" name="Sidewalk 9" owner="2761" />
  485.     <card id="16426" file="card_16426.xml" marked="false" name="Sidewalk 19" owner="2761" />
  486.     <card id="16834" file="card_16834.xml" marked="false" name="Maitre'D 2" owner="2761" />
  487.     <card id="17074" file="card_17074.xml" marked="false" name="Sidewalk 10" owner="2761" />
  488.     <card id="17310" file="card_17310.xml" marked="false" name="Sidewalk 18" owner="2761" />
  489.     <card id="17426" file="card_17426.xml" marked="false" name="Sidewalk 17" owner="2761" />
  490.     <card id="17790" file="card_17790.xml" marked="false" name="Sidewalk 16" owner="2761" />
  491.     <card id="18040" file="card_18040.xml" marked="false" name="Sidewalk 15" owner="2761" />
  492.     <card id="18336" file="card_18336.xml" marked="false" name="Sidewalk 14" owner="2761" />
  493.     <card id="18641" file="card_18641.xml" marked="false" name="Ebb Tide" owner="2761" />
  494.     <card id="18876" file="card_18876.xml" marked="false" name="Sidewalk 12" owner="2761" />
  495.     <card id="19181" file="card_19181.xml" marked="false" name="Bus Stop" owner="2761" />
  496.     <card id="19305" file="card_19305.xml" marked="false" name="On the Bus" owner="2761" />
  497. </stack>
  498.